package de.luisoft.ui.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;

import com.vaadin.data.util.BeanItemContainer;

public class ProjectModelContainer extends BeanItemContainer<ProjectModel>
	implements Serializable {

	private static final long serialVersionUID = -1909118837237265247L;
	public static HashMap<String, String[]> m = new LinkedHashMap<String, String[]>();
	
	private List<ProjectModel> l = new ArrayList<ProjectModel>();

	public ProjectModelContainer() {
		super(ProjectModel.class);
		m.put("Mountainbiking", new String[] { "1", "30" });
		m.put("Schule im alten Rom", new String[] { "2", "30" });
		m.put("Grevens Geschichte", new String[] { "3", "20" });
		m.put("Multimediapräsentation Raumfahrt", new String[] { "4", "15" });
		m.put("Das Augustinianum", new String[] { "5", "15" });
		m.put("Sütterlin ist einfach – Schule wie im Kaiserreich", new String[] { "6", "20" }); // unknown
		m.put("Rhetorik in Theorie und Praxis", new String[] { "7", "15" });
		m.put("Englische Reime und Limericks", new String[] { "8", "30" });
		m.put("Kreative Pausengestaltung", new String[] { "9", "30" });
		m.put("Vielfalt. Macht. Gute Schule?", new String[] { "10", "30" });//10
		m.put("Breakdance und Hip Hop", new String[] { "11", "30" });
		m.put("Fadenbilder", new String[] { "12", "15" });
		m.put("Verrücktes Theater", new String[] { "13", "30" });
		m.put("Wir machen Schule", new String[] { "14", "15" });
		m.put("Rund um‘s Buch", new String[] { "15", "30" });
		m.put("Zirkus auf dem Flur", new String[] { "16", "30" });
		m.put("Google und Greven", new String[] { "17", "25" });
		m.put("Traditionelle Kartenspiele", new String[] { "18", "20" });
		m.put("Bemalung der Türen", new String[] { "19", "15" });
		m.put("Fahrradtourismus im Münsterland", new String[] { "20", "30" });
		m.put("Trampolinturnen", new String[] { "21", "15" });
		m.put("Kreuzwege und Wegkreuze", new String[] { "22", "15" });
		m.put("Kunst an stillen Orten", new String[] { "23", "30" });
		m.put("Erste Hilfe Kurs", new String[] { "24", "15" });
		m.put("GAG aktuell", new String[] { "25", "30" });
		m.put("Umweltschutz am Augustinianum", new String[] { "26", "30" });
		m.put("Gesunde Schule", new String[] { "27", "30" });//27
		m.put("Spiele der Alten Römer", new String[] { "28", "15" });
		m.put("Champs Elysées – Au GAG", new String[] { "29", "30" });
		m.put("Ein Wandbild für die Schule", new String[] { "30", "18" });
//		m.put("Häkeln – Mode selbst gemacht!", new String[] { "31", "15" });
		m.put("Jugendorte in der Stadt", new String[] { "32", "25" });
		m.put("Buchbinden", new String[] { "33", "20" });
//		m.put("Geocaching", new String[] { "34", "15" });
		m.put("School-Stomp", new String[] { "36", "30" });
		m.put("Nutzung der Sonnenenergie", new String[] { "37", "20" });
		m.put("Geheime Botschaften", new String[] { "38", "24" });
		m.put("no budget hike", new String[] { "39", "24" });
		m.put("Radwanderwege", new String[] { "40", "45" });
		m.put("Tatort Schule", new String[] { "41", "15" });
		m.put("Let's groove!", new String[] { "42", "30" });

		m.put("Sind Affen denn auch Leute...", new String[] { "44", "30" });
//		m.put("Mountainbiking", new String[] { "45", "30" });
		m.put("Geocaching", new String[] { "46", "30" });
		m.put("Sich ausprobieren in Bewegung", new String[] { "47", "20" });
		
		m.put("Sverige = Schweden", new String[] { "49", "15" });
		m.put("Bäume, Blume, Unkraut….", new String[] { "50", "30" });
		m.put("Mathematik zum Anfassen", new String[] { "51", "16" });
		m.put("American Baseball", new String[] { "52", "30" });
		m.put("2-Tages-Tenniscamp", new String[] { "53", "20" });
		m.put("Schmecken, riechen, hören", new String[] { "54", "30" });
		m.put("Musikproduktion am Computer", new String[] { "55", "30" });
		m.put("Presenting our school", new String[] { "56", "20" });
		m.put("Auslandserfahrung", new String[] { "57", "20" });
		m.put("Brettspiel Go", new String[] { "58", "15" });
		m.put("Privet, Rossija!", new String[] { "59", "30" });
		m.put("Blues und mehr", new String[] { "60", "15" });
		m.put("Lebensmittelchemie", new String[] { "61", "15" });
		m.put("Textiles Designe", new String[] { "62", "20" });
		m.put("Impro-Theater", new String[] { "63", "20" });
		m.put("Mülltrennung - Recycling", new String[] { "64", "15" });
		m.put("Wir entwickeln Erdkundespiele", new String[] { "65", "15" });
		m.put("Präsentationen zu Hastings", new String[] { "66", "30" });
		m.put("Lippenpflege", new String[] { "67", "16" });
		m.put("Borussia Dortmund", new String[] { "68", "15" });
		m.put("Greven – was gibt es, was fehlt uns?", new String[] { "69", "15" });
		m.put("Breakdance (& Hip Hop)", new String[] { "70", "15" });

		List<String> lx = new ArrayList<String>(m.keySet());
		for (int i = 0; i < lx.size(); i++) {
			ProjectModel p = new ProjectModel();
			p.setName(lx.get(i));
			p.setTeacher("teacher" + i);
			p.setNr(i);
			p.setCapacity(Integer.parseInt(m.get(lx.get(i))[1]));

			l.add(p);

			addItem(p);
		}
	}
	
	public List<ProjectModel> getList() {
		return l;
	}
}